import _00GraphFuc as gf
import _000GraphBasicProblem as gb

#匈牙利算法进行二分图匹配
V1={'xl','x2','x3','x4','x5'}
V2={'y1','y2','y3','y4','y5'}
V=V1|V2
E={('x1','y1'),('x1','y2'),('x2','y2'),('x2','y3'),('x3','y2'),('x3','y5'),('x4','y3'),('x5','y3'),('x5','y4'),
   ('x5','y5')}
path=['x1','y1']
gf.drawgraph(E)
matchset=gb.matchmaxset(V1,V2,E,path)
gf.drawgraph(matchset)
print(matchset)